package com.trendit.print.sdk.models.soundbox;

import com.trendit.print.sdk.DaquObject;
import com.trendit.print.sdk.DaquRequest;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

public class GetPlayResultRequest implements DaquRequest<GetPlayResultResponse> {

    private DaquObject bizModel;

    /**
     * 构造方法
     *
     * @param bizModel
     */
    public GetPlayResultRequest(GetPlayResultRequest.Model bizModel) {
        this.bizModel = bizModel;
    }


    @Override
    public String getApiMethodName() {
        return "openapi.getPlayResult";
    }

    @Override
    public String getApiVersion() {
        return "1.0";
    }

    @Override
    public String getNotifyUrl() {
        return null;
    }

    @Override
    public String getApiMethodURL() {
        return "/openapi/speaker/get_play_result";
    }

    @Override
    public Class<GetPlayResultResponse> getResponseClass() {
        return GetPlayResultResponse.class;
    }

    @Override
    public DaquObject getBizModel() {
        return bizModel;
    }

    @Override
    public String getBizContent() {
        return null;
    }

    @Data
    public static class Model extends DaquObject {

        /**
         * 设备编码
         */
        @NotBlank(message = "设备编号不能为空")
        private String sn;

        /**
         * 先拿到播报回执ID
         */
        @NotNull
        private Long playId;

    }
}
